package com.vn.ld.btc.dao.common;

import java.util.ArrayList;
import java.util.List;

import com.vn.ld.common.domain.PageObjInfo;

public class SearchResult<T> extends ArrayList<T> implements List<T> {

	private static final long serialVersionUID = 1386362694037002739L;

	private PageObjInfo pageObjInfo;
	private Object[] summary;

	public void setResult(List<T> result) {
		if (result != null && result.size() > 0) {
			this.addAll(result);
		}
	}

	@Override
	public String toString() {
		return "SearchResult-[pagingInfo:" + pageObjInfo + ", result size:" + this.size() + "]";
	}

	public PageObjInfo getPageObjInfo() {
		return pageObjInfo;
	}

	public void setPageObjInfo(PageObjInfo pageObjInfo) {
		this.pageObjInfo = pageObjInfo;
	}

	public Object[] getSummary() {
		return summary;
	}

	public void setSummary(Object[] summary) {
		this.summary = summary;
	}

}
